package com.ronds.webtest.Listener;

import org.testng.IRetryAnalyzer;
import org.testng.ITestResult;

/**
 * 重试次数计数
 */
public class Retry implements IRetryAnalyzer {
    public static int retryCount         = 0;
    private int maxRetryCount     = 0;   // 重试次数

    @Override
    public boolean retry(ITestResult result) {
        if (retryCount <maxRetryCount) {
            retryCount++;
            return true;
        }
        retryCount = 0;
        return false;
    }
}
